package com.nlx.notes.module.core.enums.error;

import com.nlx.notes.module.core.consts.ErrorCodeConst;
import com.nlx.notes.support.handler.exception.ErrorCode;
import lombok.Getter;

@Getter
public enum GoldCodeEnum implements ErrorCode {

    SAVE_GOLD_ERROR(1, "添加黄金失败"),
    NOT_EXISTS_GOLD_OVERVIEW(2, "未查询到黄金概览信息"),
    NOT_EXISTS_GOLD_PURCHASE(3, "您操作的黄金不存在"),
    EDIT_GOLD_ERROR(4, "修改黄金失败"),
    NOT_FOUND_GOLD_SALE_OVERVIEW_ERROR(5, "未找到黄金售卖概览数据"),
    SALE_GOLD_WEIGHT_EXCEED_HOLD_WEIGHT_ERROR(6,"卖出重量超过持有重量"),
    ;

    private final int code;

    private final String message;

    GoldCodeEnum(int code, String message) {
        this.code = ErrorCodeConst.LOGIN_ERROR_CODE_PREFIX + code;
        this.message = message;
    }

}
